package com.test.model;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.Set;

/**
 * 温度面板
 * @author zxw
 * create 2016年3月2日 下午8:14:19
 */
@Entity
@Table(name="rcc_e_temperaturePanel")
public class TemperaturePanel implements Serializable{
   private Integer uniqueId;
   private String serialNo;//编号
   private String detailPosition;//安装位置
   private Integer index;//序号
   private Model model;//型号
    private Date installDate;
    private Date createDate;
    private NetEqu netEqu;//网络设备
    private Collector collector;//所属采集器
    private House house;
    private Integer port;//所在端口
    private String memo;
//   private Set<TemperaturePanelCurrentAlarm> temperaturePanelCurrentAlarm;
//   private Set<TemperaturePanelCurrentFault> temperaturePanelCurrentFault;
//    private Set<TemperaturePanelHistoricalAlarm> temperaturePanelHistoricalAlarm;
//    private Set<TemperaturePanelHistoricalFault> temperaturePanelHistoricalFault;
//    private Set<TemperaturePanelCurrentData> temperaturePanelCurrentData;

   @Id
   @GeneratedValue
   @Column(name = "uniqueId", unique = true, nullable = false)
   public Integer getUniqueId() {
       return uniqueId;
   }
   @Column(name = "serialNo",  nullable = false)
   public String getSerialNo() {
       return serialNo;
   }



    @Column(name = "detailPosition")
    public String getDetailPosition() {
        return detailPosition;
    }

    public void setDetailPosition(String detailPosition) {
        this.detailPosition = detailPosition;
    }

   @Column(name = "`index`")
   public Integer getIndex() {
       return index;
   }


   @ManyToOne(fetch = FetchType.LAZY)
   @JoinColumn(name = "modelId",nullable = false)
   public Model getModel() {
       return model;
   }
   public void setUniqueId(Integer uniqueId) {
       this.uniqueId = uniqueId;
   }
   public void setSerialNo(String serialNo) {
       this.serialNo = serialNo;
   }
   public void setIndex(Integer index) {
       this.index = index;
   }
   public void setModel(Model model) {
       this.model = model;
   }
//   @OneToMany(mappedBy = "temperaturePanel")
//   public Set<TemperaturePanelCurrentAlarm> getTemperaturePanelCurrentAlarm() {
//       return temperaturePanelCurrentAlarm;
//   }
//   public void setTemperaturePanelCurrentAlarm(Set<TemperaturePanelCurrentAlarm> temperaturePanelCurrentAlarm) {
//       this.temperaturePanelCurrentAlarm = temperaturePanelCurrentAlarm;
//   }
//   @OneToMany(mappedBy = "temperaturePanel")
//   public Set<TemperaturePanelCurrentFault> getTemperaturePanelCurrentFault() {
//       return temperaturePanelCurrentFault;
//   }
//   public void setTemperaturePanelCurrentFault(Set<TemperaturePanelCurrentFault> temperaturePanelCurrentFault) {
//       this.temperaturePanelCurrentFault = temperaturePanelCurrentFault;
//   }
//
//    @OneToMany(mappedBy = "temperaturePanel")
//    public Set<TemperaturePanelHistoricalAlarm> getTemperaturePanelHistoricalAlarm() {
//        return temperaturePanelHistoricalAlarm;
//    }
//
//    public void setTemperaturePanelHistoricalAlarm(Set<TemperaturePanelHistoricalAlarm> temperaturePanelHistoricalAlarm) {
//        this.temperaturePanelHistoricalAlarm = temperaturePanelHistoricalAlarm;
//    }
//
//    @OneToMany(mappedBy = "temperaturePanel")
//    public Set<TemperaturePanelHistoricalFault> getTemperaturePanelHistoricalFault() {
//        return temperaturePanelHistoricalFault;
//    }
//
//    public void setTemperaturePanelHistoricalFault(Set<TemperaturePanelHistoricalFault> temperaturePanelHistoricalFault) {
//        this.temperaturePanelHistoricalFault = temperaturePanelHistoricalFault;
//    }
//
//    @OneToMany(mappedBy = "temperaturePanel")
//   public Set<TemperaturePanelCurrentData> getTemperaturePanelCurrentData() {
//       return temperaturePanelCurrentData;
//   }
//   public void setTemperaturePanelCurrentData(Set<TemperaturePanelCurrentData> temperaturePanelCurrentData) {
//       this.temperaturePanelCurrentData = temperaturePanelCurrentData;
//   }
    @Column(name = "installDate")
    public Date getInstallDate() {
        return installDate;
    }

    public void setInstallDate(Date installDate) {
        this.installDate = installDate;
    }
    @Column(name = "createDate")
    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "netEquId")
    public NetEqu getNetEqu() {
        return netEqu;
    }

    public void setNetEqu(NetEqu netEqu) {
        this.netEqu = netEqu;
    }
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "collectorId")
    public Collector getCollector() {
        return collector;
    }

    public void setCollector(Collector collector) {
        this.collector = collector;
    }
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "houseId")
    public House getHouse() {
        return house;
    }

    public void setHouse(House house) {
        this.house = house;
    }
    @Column(name = "port")
    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }
    @Column(name = "memo")
    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }
}
